#ifndef KEYBINDER_H_
#define KEYBINDER_H_

#include <SFML/Window.hpp>
#include <map>
#include "Key.h"
#include "MouseClick.h"

class KeyBinder {
    public:
        enum InputKey {
            LEFT, RIGHT, FORWARD, BACKWARD, ACCELERATE, DECELERATE, SHOOT
        };

    private:
        static KeyBinder* instance;
        sf::Window* window;
        std::map<InputKey, Action*> bindings;

    private:
        KeyBinder();

    public:
        static KeyBinder* getInstance();
        virtual ~KeyBinder();
        void setWindow(sf::Window* window);
        void loadBindings();
        void update();
        void bindKey(InputKey key, sf::Keyboard::Key newKey);
        bool isKeyPressed(InputKey key);
        bool isKeyTapped(InputKey key);
};

#endif /*KEYBINDER_H_*/
